ansi_rgb
Colorful console text using ANSI escape sequences.
- Very simple API
- Full color (using the
rgb
crate) - Colors all the formatting traits
no_std
compliant
Cargo.toml:
= "0.2.0"
Foreground colors
use ;
println!;
Output:
Background colors
use ;
println!;
Output:
Mix and match
# Cargo.toml
[]
= "0.8"
use ;
use RGB8;
let fg = RGB8 new;
let bg = RGB8 new;
println!;
Output:
Anything formattable
;
let foo = Foo;
println!;
Output:
Windows users
You need to set your console mode. Otherwise you'll get garbage like this:
�[48;2;159;114;0m �[0m